package ooday02;
/** Person家族的测试类 */
public class ExtendsTest {
    public static void main(String[] args) {
        Doctor was = new Doctor();
        was.name="王安石";
        was.age=54;
        was.address="长安街";
        was.title="首辅";
        was.eat();
        was.sleep();
        was.sayHi();
        was.cut();

        Teacher ll = new Teacher("李琳",22,"绵阳",8000.0);
        ll.eat();
        ll.sleep();
        ll.sayHi();
        ll.teach();

        Student dl = new Student("大磊",17,"四平市","jsd2408","001");
        dl.eat();
        dl.sleep();
        dl.sayHi();
        dl.study();

        Person person = new Person();
        person.name="大傻春";
        person.age=23;
        person.address="天堂市";
        person.eat();
        person.sleep();
        person.sayHi();
//        person.study(); 父类不能访问子类
//        person.teach();
//        person.className();
//        person.title();

    }
}
